package comxin.demo1.charstream;

import org.junit.Test;

import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.util.Arrays;

public class Stringdemo01 {
    @Test
    public void method1() throws UnsupportedEncodingException {
        String teststring="我爱中国";
        byte[] bytes = teststring.getBytes();
        System.out.println(Arrays.toString(bytes));
        byte[] bytes1 = teststring.getBytes("UTF-8");
        System.out.println(Arrays.toString(bytes1));
    }
}
